﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Globalization;

namespace ZhiHeng.OneCard.WpfClient.Common
{
   public class SuperMKTConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string str = "";
            try
            {
                str = String.Format("{0:N}%",System.Convert.ToInt32(value)*0.01);
            }
            catch (Exception ex)
            {
                return "0.00%";
            }

            return str;
        }



        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
